package com.bw.services.properties.model

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import retrofit2.create
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object PropertiesModule {
    @Provides
    @Singleton
    fun getPropertiesApiService(retrofit: Retrofit):PropertiesService  =retrofit.create(PropertiesService::class.java)

    @Provides
    @Singleton
    fun getPropertiesRepo(apiService: PropertiesService):PropertiesRepo{
        return PropertiesRepo(apiService)
    }

}